/**
 * syntaxhighlight2fckeditor.
 * Copyright (C) 2008-2010 Ranfow Tsang(ranfow@gmail.com).
 * http://code.google.com/p/syntaxhighlight2fckeditor/
 * 
 * This file is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General 
 * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) 
 * any later version.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to 
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */
 
var SyntaxHighlightCommand=function(){
//create our own command, we dont want to use the FCKDialogCommand because it uses the default fck layout and not our own
};
SyntaxHighlightCommand.GetState=function() {
    return FCK_TRISTATE_OFF; //we dont want the button to be toggled
}
SyntaxHighlightCommand.Execute=function() {
    //open a popup window when the button is clicked
    window.open(FCKConfig.PluginsPath + 'syntaxhighlight/SyntaxHighlight.html', 'SyntaxHighlight', 'width=680,height=440,scrollbars=no,scrolling=no,location=no,toolbar=no');
}
FCKCommands.RegisterCommand('SyntaxHighlight', SyntaxHighlightCommand ); //otherwise our command will not be found
var btnSyntaxHighlight = new FCKToolbarButton('SyntaxHighlight', 'Insert SyntaxHighlight Code');
btnSyntaxHighlight.IconPath = FCKConfig.PluginsPath + 'syntaxhighlight/code.gif';   //specifies the image used in the toolbar
FCKToolbarItems.RegisterItem( 'SyntaxHighlight', btnSyntaxHighlight );